<include file="./Tpl/Admin/header.html" />
<div class="main">
  <div class="main_title"> <img src="/Public/Admin/images/book1.gif"/>&nbsp;&nbsp;财富币认购 </div>
  <eq name="module" value="list">
  <div class="list_body">
  <form action="?s=Admin/Issue/delAll" method="post" id="formid">
  <table cellspacing=0 cellpadding=0 border=0>
    <tr>
      <th width="5%">选择</th>
      <th width="15%">认购总量</th>
      <th width="12%">已认购量</th>
      <th width="12%">剩余量</th>
      <th width="12%">认购价格</th>
      <th width="12%">限购数量</th>
	   <th width="12%">开始时间</th>
	   <th width="12%">结束时间</th>
      <th width="5%">状态</th>
      <th width="7%">操作</th>
    </tr>
    <volist name="list" id="vo">
      <tr>
        <td><input type="checkbox" class="id" name="id[]" value="{$vo.id}"></td>
        <td>{$vo.num|default='0'}</td>
        <td>{$vo.deal|default='0'}</td>
        <td>{$vo.nownum|default='0'}</td>
        <td>{$vo.price|default='0'}</td>
        <td>{$vo.limit|default='0'}</td>
		<td>{$vo.add_time|date='Y-m-d H:i:s',###}</td>
        <td>{$vo.end_time|date='Y-m-d H:i:s',###}</td>
        <td>{$vo.status}</td>
        <td><a href="?s=Admin/Issue/set/id/{$vo.id}">修改</a> <a href="?s=Admin/Issue/del/id/{$vo.id}">删除</a></td>
      </tr>
    </volist>
    <tr>
      <td colspan=9 class="page"><input type="button" id="all" value=" 全选 ">
        <input type="button" id="all_return" value=" 全不选 ">
        <input type="button" id="dels" value=" 批量删除 ">
        <input type="button" id="add" value=" 添加 ">
        <a href="?s=Admin/Issue/index/page/1">首页</a> <a href="?s=Admin/Issue/index/page/{$page-1}">上一页</a> <a href="?s=Admin/Issue/index/page/{$page+1}">下一页</a> <a href="?s=Admin/Issue/index/page/{$page_num}">尾页</a> </td>
    </tr>
  </table>
  </div>
  <else/>
  <div class="main_body">
  <form action="?s=Admin/Issue/update" method="post">
    <input type="hidden" name="id" value="{$id}"/>
    <table cellspacing=0 cellpadding=0 border=0>
      <tr>
        <td>认购总量</td>
        <td><input type="text" name="num" value="{$num|default=0}"/></td>
      </tr>
      <tr>
        <td>已认购量</td>
        <td><input type="text" name="deal" value="{$deal|default=0}"/></td>
      </tr>
      <tr>
        <td>认购价格</td>
        <td><input type="text" name="price" value="{$price|default=0}"/></td>
      </tr>
      <tr>
        <td>每人限量</td>
        <td><input type="text" name="limit" value="{$limit|default=0}"/></td>
      </tr>
      <tr>
        <td>抢购时间</td>
        <td><input type="text" name="add_time" value="{$add_time|date='Y-m-d H:i:s',###}"/></td>
      </tr>
      <tr>
        <td>结束时间</td>
        <td><input type="text" name="end_time" value="{$end_time|date='Y-m-d H:i:s',###}"/></td>
      </tr>
      <tr>
        <td>认购介绍</td>
        <td><textarea name="info" cols=100 rows=20>{$info}</textarea>
        </td>
      </tr>
    </table>
    <div>
      <input type="submit" value="提交"/>
    </div>
  </form>
</div>
</eq>
</div>
<include file="./Tpl/Admin/footer.html" />
<script language="javascript" src="/Public/plugin/kindeditor/jquery.tools.min.js"></script>
<script language="javascript" src="/Public/plugin/kindeditor/kindeditor-min.js"></script>
<script language="javascript" src="/Public/plugin/kindeditor/zh_CN.js"></script>
<script language="javascript">
$(document).ready(function(){
    $('#all').click(function(){
	    $('.id').attr('checked',true);
	});
	$('#all_return').click(function(){
	    $('.id').attr('checked',false);
	});
    $('#dels').click(function(){

		f = 0;
	    $('.id').each(function(){
		    if($(this).attr('checked')) f = 1;
		});
		
        if(f==0){
		    alert('请选择要删除的项！');
		}else{
		    $('#formid').submit();
		}
	});
	$('#add').click(function(){
	    location.href="?s=Admin/Issue/add";
	});
});

var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="info"]', {
		resizeType : 1,
		allowPreviewEmoticons : false,
		allowImageUpload : true,
		items : [
			'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
			'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
			'insertunorderedlist', '|', 'image', 'link']
	});
});
</script>
<script type="text/javascript">
	$(document).ready(function(e) {
        //打开子菜单
			$("#collapseFive").addClass("in");	
    });
</script>